import { lazy } from 'react'
import { WapHomeO, OrdersO, ServiceO, Contact } from '@react-vant/icons';
export const mainRouter = [
    {
        path: '/index/home',
        element: lazy(() => import('../page/Index/Home')),
        title: '首页',
        icon: <WapHomeO />
    },
    {
        path: '/index/order',
        element: lazy(() => import('../page/Index/Order')),
        title: '订单',
        icon: <OrdersO />
    },
    {
        path: '/index/service',
        element: lazy(() => import('../page/Index/Service')),
        title: '客服',
        icon: <ServiceO />
    },
    {
        path: '/index/my',
        element: lazy(() => import('../page/Index/My')),
        title: '我的',
        icon: <Contact />
    }
]
const routes = [
    {
        path: '/',
        to: '/index/home'
    },
    {
        path: '/index',
        element: lazy(() => import('../page/Index')),
        children: mainRouter
    },
    {
        path: '/login',
        element: lazy(() => import('../page/Login'))
    },
    {
        path: '/register',
        element: lazy(() => import('../page/Register'))
    },
    {
        path: '/maps',
        element: lazy(() => import('../page/Maps'))
    },
    {
        path: '/contacts',
        element: lazy(() => import('../page/Contacts'))
    },
    {
        path: '/seat',
        element: lazy(() => import('../page/Seat'))
    },
    {
        path: '/filling',
        element: lazy(() => import('../page/Filling'))
    },
    {
        path: '/addcontacts',
        element: lazy(() => import('../page/AddContacts'))
    },
    {
        path: '/editcontacts',
        element: lazy(() => import('../page/EditContacts'))
    },
    {
        path: '/cancel',
        element: lazy(() => import('../page/Cancel'))
    },
    {
        path: '/payment',
        element: lazy(() => import('../page/Payment'))
    },
    {
        path: '/success',
        element: lazy(() => import('../page/Success'))
    },
    {
        path: '/querylist',
        element: lazy(() => import('../page/QueryList'))
    },
    {
        path: '/details',
        element: lazy(() => import('../page/Details'))
    },
    {
        path: '/gocontacts',
        element: lazy(() => import('../page/GoContacts'))
    },
    {
        path: '/end',
        element: lazy(() => import('../page/End'))
    },
    {
        path: '/start',
        element: lazy(() => import('../page/Start'))
    },
    {
        path: '*',
        element: lazy(() => import('../page/Error'))
    }

]
export default routes